package com.acsior.hibernate.vo;

// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernateVO;

/**
 * CdAllowedPlace entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "cdAllowedPlaces")
@GeneratorKey(tableName = "cdAllowedPlaces")
public class CdAllowedPlaceVO extends HibernateVO {
	/** */
	private static final long serialVersionUID = 5314114474440878520L;

	@Id
	@Column(name = "allowedPlaceID", unique = true, nullable = false)
	private Integer allowedPlaceId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "crCodeID", nullable = false)
	private CdCRCodeVO cdCRCode;

	@Column(name = "objectID", nullable = false)
	private String objectId;

	// Constructors

	/** default constructor */
	public CdAllowedPlaceVO() {
		// и те така
	}

	/**
	 * @return стойността на allowedPlaceId
	 */
	public Integer getAllowedPlaceId() {
		return this.allowedPlaceId;
	}

	
	/**
	 * @param allowedPlaceId се залага в allowedPlaceId
	 */
	public void setAllowedPlaceId(Integer allowedPlaceId) {
		this.allowedPlaceId = allowedPlaceId;
	}


	
	/**
	 * @return стойността на cdCRCode
	 */
	public CdCRCodeVO getCdCRCode() {
		return this.cdCRCode;
	}


	
	/**
	 * @param cdCRCode се залага в cdCRCode
	 */
	public void setCdCRCode(CdCRCodeVO cdCRCode) {
		this.cdCRCode = cdCRCode;
	}


	
	/**
	 * @return стойността на objectId
	 */
	public String getObjectId() {
		return this.objectId;
	}


	
	/**
	 * @param objectId се залага в objectId
	 */
	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}


	/**
	 * @see com.acsior.dac.data.Data#getId()
	 */
	@Override
	public Object getId() {
		return getAllowedPlaceId();
	}

	/**
	 * @see com.acsior.dac.impl.hibernate.vo.HibernateVO#setId(java.lang.Object)
	 */
	@Override
	public void setId(Object id) {
		setAllowedPlaceId(Integer.class.cast(id));
	}
}